#include<iostream>
#include<vector>
#include<cstdio>
#include<algorithm>
#include<map>
using namespace std;


// 六个长宽，看看是否可以构成长方体
int main(){
    int w,h;
    int count = 0;
    map<int,int> wh;
    while(scanf("%d %d",&w,&h) != 1){
        count++;
        map<int,int>::iterator iter = wh.find(w);
        if(iter != wh.end()){
            iter->second++;
        }
        else{
            wh.insert(pair<int,int>(w,1));
        }

        iter = wh.find(h);
        if(iter != wh.end()){
            iter->second++;
        }
        else{
            wh.insert(pair<int,int>(h,1));
        }

        if(count == 6){
            bool flag = false;
            if(wh.size() == 1){
                iter = wh.begin();
                if(iter->second == 12){
                    flag = true;
                }
            }
            else if(wh.size() == 2){
                iter = wh.begin();
                if((iter->second == 4 && wh[1] == 8)
                || (iter->second == 8 && wh[1] == 4))
                {
                    flag = true;
                }

            }
            else if(wh.size() == 3){
                iter = wh.begin();
                while(iter != wh.end()){
                    if(iter->second != 4){
                        break;
                    }
                    iter++;
                }
                if(iter == wh.end()){
                    flag = true;
                }
            }
            if(flag){
                cout<<"POSSIBLE\n";
            } else {
                cout<<"IMPOSSIBLE\n";
            }
            wh.clear();
            count = 0;
        }
    }

    return 0;
}
